gpsdata_type objective;
unsigned int masked_objective;
int verbose_status; /* set by GUI wrappers for status */
- int no_smart_icons;
- int no_smart_names;
+ int smart_icons;
+ int smart_names;
cet_cs_vec_t *charset;
char *charset_name;
inifile_t *inifile;
}
/*
- * If we're not using smart icons, try to put the cache info in the
+ * If we're using smart names, try to put the cache info in the
* description.
*/
const char *
get_gc_info(waypoint *wpt)
{
- if (global_opts.no_smart_icons) {
+ if (global_opts.smart_names) {
if (wpt->gc_data.type == gt_virtual) return "V ";
if (wpt->gc_data.type == gt_unknown) return "? ";
if (wpt->gc_data.type == gt_multi) return "Mlt ";
}
way[i]->ident[sizeof(way[i]->ident)-1] = 0;
- if (!global_opts.no_smart_icons &&
+ if (global_opts.smart_names &&
wpt->gc_data.diff && wpt->gc_data.terr) {
snprintf(obuf, sizeof(obuf), "%s%d/%d %s",
get_gc_info(wpt),
else
fputs(odesc, ofd);
- if (!global_opts.no_smart_icons &&
- waypointp->gc_data.diff && waypointp->gc_data.terr) {
+ /* It's tempting to conditionalize this on smart_names, but
+ * KML is so robust that it makes sense to just always do
+ * this for geocaches. (Plus the convenience of being able
+ * to do a drag-n-drop into Earth without extra option is a
+ * win.)
+ */
+ if (waypointp->gc_data.diff && waypointp->gc_data.terr) {
if (waypointp->gc_data.placer) {
char *p = xml_entitize(waypointp->gc_data.placer);
fprintf(ofd, "<![CDATA[<i> by %s</i>]]>", p);
kml_write_xml(-1, "</IconStyle>\n");
kml_write_xml(-1, "</Style>\n");
- } else if (!global_opts.no_smart_icons && waypointp->gc_data.diff && waypointp->gc_data.terr) {
+ } else if (waypointp->gc_data.diff && waypointp->gc_data.terr) {
char *is = kml_lookup_gc_icon(waypointp);
kml_write_xml(1, "<Style>\n");
kml_write_xml(1, "<IconStyle>\n");
odesc = isrc ? isrc : "";
owpt = mag_cleanse(owpt);
- if (!global_opts.no_smart_icons &&
+ if (global_opts.smart_icons &&
waypointp->gc_data.diff && waypointp->gc_data.terr) {
sprintf(ofmtdesc, "%d/%d %s", waypointp->gc_data.diff,
waypointp->gc_data.terr, odesc);
global_opts.masked_objective |= POSNDATAMASK;
break;
case 'N':
+#if 0
+/* This option is silently eaten for compatibilty. -N is now the
+ * default. If you want the old behaviour, -S allows you to individually
+ * turn them on. The -N option will be removed in 2008.
+ */
+
switch(argv[argn][2]) {
case 'i':
global_opts.no_smart_icons = 1;
global_opts.no_smart_icons = 1;
break;
}
+#endif
+ break;
+ case 'S':
+ switch(argv[argn][2]) {
+ case 'i':
+ global_opts.smart_icons = 1;
+ break;
+ case 'n':
+ global_opts.smart_names = 1;
+ break;
+ default:
+ global_opts.smart_icons = 1;
+ global_opts.smart_names = 1;
+ break;
+ }
break;
case 'x':
optarg = argv[argn][2]
const char *
get_cache_icon(const waypoint *waypointp)
{
- if (global_opts.no_smart_icons)
+ if (!global_opts.smart_icons)
return NULL;
/*